***************************************************************************************************
*  "Animal welfare is a stronger determinant of public support for meat taxation than             *
*  climate change mitigation in Germany"  														  *
*  Perino & Schwickert																			  *
*  January 2023																					  *
*  Do-file to replicate study results, figures and tables										  *
***************************************************************************************************

clear 
global my_dir ""

/*
	Note: 	Please define the global directory according to where you have stored the data.
*/
	
cd "$my_dir"

log using PerinoSchwickert2023_log, replace text

* Importing data *
import excel using PerinoSchwickert2023_data.xlsx, firstrow clear


*****************************************
******         Dataset             ******
*****************************************

* Defining variables * 
label define block 1 "animal welfare, uniform, low salience" 2 "animal welfare, uniform, high salience" 3 "animal welfare, diff, low salience" 4 "animal welfare, diff, high salience" 5 "climate, uniform, low salience" 6 "climate, uniform, high salience" 7 "climate, diff, low salience" 8 "climate, diff, high salience"
 label values block block
 
label define scheme 1 "Animal welfare Uniform" 2 "Animal welfare Diff" 3 "Climate Uniform" 4 "Climate Diff"
 label values scheme scheme

label define purpose 0 "Animal welfare" 1 "Climate"
 label values purpose purpose
 
label define type 0 "Uniform tax" 1 "Differentiated tax"
 label values type type
 
label define timing 0 "Low salience" 1 "High salience"
 label values timing timing
 
label define vote 0 "no" 1 "yes" 2 "abstained"
 label values vote vote
 
label define belownall 1 "Decrease" 2 "Remain the same" 3 "Increase"
 label values belownall belownall
 
forvalues i = 1 / 4 {
 label define belown`i' 1 "Decrease" 2 "Remain the same" 3 "Increase"
 label values belown`i' belown`i'
}


* Adding tax level as categorical variable * 
gen tax_c = 1
 replace tax_c = 2 if tax==.39
 replace tax_c = 3 if tax==.58
 replace tax_c = 4 if tax==.78
 replace tax_c = 5 if tax==1.17
 replace tax_c = 6 if tax==1.56
label var tax_c "Tax levels (categorical)"
 label define tax_c 1 "€0.19/kg" 2 "€0.39/kg" 3 "€0.58/kg" 4 "€0.78/kg" 5 "€1.17/kg" 6 "€1.56/kg" 
 label values tax_c tax_c


* Adding dummy for abstained from vote *
gen abstained = 1 if vote==2
 replace abstained = 0 if missing(abstained)

 
* Adding dummy = 1 only once per respondent for sample characteristics analysis *
gen Dglobal = 1 if mod(_n, 6) == 1
 replace Dglobal = 0 if missing(Dglobal)

order id proposal vote Dglobal


* Generating percentage of "remain stable" answers *
gen belstaball = 100 - beldownall - belupall

forvalues i = 1 / 4 {
	gen belstab`i' = 100 - beldown`i' - belup`i'
} 
 

* Recoding demographic variables *
gen Dfemale = 1 if sex==1
 replace Dfemale = 0 if missing(Dfemale)
 label var Dfemale "Female"
 label define Dfemale 0 "Male" 1 "Female"
 label values Dfemale Dfemale

gen ageg = 0 
 replace ageg = 1 if age > 39 & age < 60
 replace ageg = 2 if age > 59 
 label var ageg "Age groups"
 label define ageg 0 "<40 years" 1 "40-59 years" 2 "60+ years"
 label values ageg ageg
gen Dage1 = 1 if age < 40
 replace Dage1 = 0 if missing(Dage1)
 label var Dage1 "<40 years"
gen Dage2 = 1 if age > 39 & age < 60
 replace Dage2 = 0 if missing(Dage2)
 label var Dage2 "40-59 years"
gen Dage3 = 1 if age > 59 
 replace Dage3 = 0 if missing(Dage3)
 label var Dage3 "60+ years"

recode region (5 6 8 9 15 = 1) (3 4 13 14 16 = 2) (1 2 = 3) (7 10 11 12 = 4), gen(regiong)
 label var regiong "Region"
 label define regiong 1 "North" 2 "East" 3 "South" 4 "West"
 label values regiong regiong
tab regiong, gen(Dregion) 
 label var Dregion1 "North"
 label var Dregion2 "East"
 label var Dregion3 "South"
 label var Dregion4 "West"

label var inc "Income"
 label define inc 1 "Below 1000" 2 "1000 - below 2000" 3 "2000 - below 4000" 4 "4000 - 6000"  5 "Above 6000"
gen incg = 0 
 replace incg = 1 if inc == 3
 replace incg = 2 if inc > 3
 label var incg "Income groups"
 label define incg 0 "<€2000" 1 "€2000-3999" 2 "€4000+"  
 label values incg incg
gen Dinc1 = 1 if inc < 3
 replace Dinc1 = 0 if missing(Dinc1)
 label var Dinc1 "<€2000"
gen Dinc2 = 1 if inc == 3
 replace Dinc2 = 0 if missing(Dinc2)
 label var Dinc2 "€2000-3999"
gen Dinc3 = 1 if inc > 3
 replace Dinc3 = 0 if missing(Dinc3)
 label var Dinc3 "€4000+"
 
label var edu "Education"
 label define edu 1 "Still in school" 2 "Certificate of general secondary education" ///
  3 "Certificate of intermediate secondary education" 4 "University-entrance diploma" 5 "University degree/PhD"
gen edug = 0 
 replace edug = 1 if edu == 3
 replace edug = 2 if edu > 3
 label var edug "Education groups"
 label define edug 0 "Low" 1 "Middle" 2 "High"  
 label values edug edug
gen Dedu1 = 1 if edu < 3
 replace Dedu1 = 0 if missing(Dedu1)
 label var Dedu1 "Low"
gen Dedu2 = 1 if edu == 3
 replace Dedu2 = 0 if missing(Dedu2)
 label var Dedu2 "Middle"
gen Dedu3 = 1 if edu > 3
 replace Dedu3 = 0 if missing(Dedu3)
 label var Dedu3 "High"

rename memhouse_r1_c1 hh_adults
 label var hh_adults "No. of adults in household"
rename memhouse_r2_c1 hh_kids
 label var hh_kids "No. of kids in household"
 replace hh_kids = 0 if missing(hh_kids)

gen Dkids = 1 if kids==1
 replace Dkids = 0 if kids==2
 replace Dkids = . if kids==3
 label var Dkids "Have kids"
 label define Dkids 0 "No" 1 "Yes"
 label values Dkids Dkids

 
* Recoding political views * 
gen polpos = 0 
 replace polpos = 1 if polview > 2 & polview < 6
 replace polpos = 2 if polview > 5 & polview < 8
 replace polpos = 3 if polview == 8
 label var polpos "Political position"
 label define polpos 0 "Left" 1 "Middle" 2 "Right" 3 "n/a"
 label values polpos polpos
 
gen Dgreen = 1 if polpo == 4
 replace Dgreen = 0 if missing(Dgreen)
 label var Dgreen "Vote for green party"
 label define Dgreen 0 "No" 1 "Yes"
 label values Dgreen Dgreen
 
 
* Renaming and recoding consumption habit variables *
rename meatpur_r1 pur_beef
 label var pur_beef "Purchase of beef"
rename meatpur_r2 pur_pork
 label var pur_pork "Purchase of pork"
rename meatpur_r3 pur_chicken
 label var pur_chicken "Purchase of poultry"
rename meatpur_r4 pur_lamb
 label var pur_lamb "Purchase of lamb/sheep/goat"
rename meatpur_r5 pur_others
 label var pur_others "Purchase of other meat"

rename shopimp_r6 imp_aw
 label var imp_aw "Importance of animal welfare"
rename shopimp_r8 imp_organic
 label var imp_organic "Importance of organic certification"
rename shopimp_r9 imp_climate
 label var imp_climate "Importance of climate and environmental impact"
 
gen Dveg1 = 1 if conhab_4 == 1 | conhab_5 == 1 | conhab_6 == 1
 replace Dveg1 = 0 if missing(Dveg1)
 label var Dveg1 "Identified vegetarian/pescetarian"
 label define Dveg1 0 "No vegetarian/pescetarian" 1 "Vegetarian/pescetarian"
 label values Dveg1 Dveg1

gen Dveg2 = 1 if meatcon_r1 == 8 & meatcon_r2 == 8 & meatcon_r3 == 8 & meatcon_r4 == 8 & meatcon_r5 == 8
 replace Dveg2 = 0 if missing(Dveg2)
 label var Dveg2 "Eats no meat"
 label define Dveg2 0 "Eats meat" 1 "Eats no meat" 
 label values Dveg2 Dveg2

gen Dpur = 1 if pur_beef == 6 & pur_pork == 6 & pur_chicken == 6 & pur_lamb == 6 & pur_others == 6
 replace Dpur = 0 if missing(Dpur)
 label var Dpur "Buys no meat"
 label define Dpur 0 "Buys meat" 1 "Buys no meat"
 label values Dpur Dpur
 
label var organiccons_r1 "Frequency of buying organic meat (1=never; 7=always)"
gen org = 1 if organiccons_r1 > 4
 replace org = 0 if organiccons_r1 < 5
 replace org = 2 if organiccons_r1 == .
 label var org "Buys organic"
 label define org 0 "Buys sometimes organic max" 1 "Buys organic rather often to always" 2 "n/a"
 label values org org


* Generating attention variables *
gen Datt1 = 1 if screen1_15==1
 replace Datt1 = 0 if missing(Datt1)
 label var Datt1 "Paid attention 1"
 label define Datt1 0 "No" 1 "Yes"
 label values Datt1 Datt1

gen Datt2 = 1 if desirability_r7==2
 replace Datt2 = 0 if missing(Datt2)
 label var Datt2 "Paid attention 2"
 label define Datt2 0 "No" 1 "Yes"
 label values Datt2 Datt2

gen att = 1 
 replace att = 2 if Datt1==1 & Datt2==1
 replace att = 0 if Datt1==0 & Datt2==0
 label var att "Correct answers to 2 attention questions"
 label define att 0 "None" 1 "1/2" 2 "2/2"
 label values att att
 
 
* Generating social desirability variables (Balanced Inventory of Desirable Responding, items by Winkler et al. 2006) *
// Renaming items to self-deceptive enhancement (SDE) + impression management (IM) 
rename desirability_r1 sde1
rename desirability_r2 sde2
rename desirability_r3 sde3
rename desirability_r4 im1
rename desirability_r5 im2
rename desirability_r6 im3

// Recoding items - the higher the value, the higher deception/desirability 
replace sde2 = 8 - sde2
replace im1 = 8 - im1
replace im3 = 8 - im3

// Generating dummy variables for high social desirability
gen sde = 0 
 replace sde = 1 if sde1+sde2+sde3==18
 replace sde = 2 if sde1+sde2+sde3==19
 replace sde = 3 if sde1+sde2+sde3==21
gen im = 0 
 replace im = 1 if im1+im2+im3==18
 replace im = 2 if im1+im2+im3==19
 replace im = 3 if im1+im2+im3==21

gen Dsde = 1 if sde > 0
 replace Dsde = 0 if missing(Dsde)
 label var Dsde "Self-deceptive enhancement"
 label define Dsde 0 "No" 1 "Yes"
 label values Dsde Dsde
gen Dim = 1 if im > 0
 replace Dim = 0 if missing(Dim)
 label var Dim "Impression management"
 label define Dim 0 "No" 1 "Yes"
 label values Dim Dim

 
 
* Defining control variables for regression models *
// Demographics
global dem = "i.Dfemale i.ageg i.regiong i.edug i.incg hh_adults hh_kids i.Dkids"
global dem2 = "Dfemale Dage* Dregion* Dedu* Dinc* hh_adults hh_kids Dkids"
// Political views
global pol = "i.govinv_r1 i.govtrust_r1 i.polpos i.Dgreen"  
// Vegetarian and shopping habits
global veg = "i.Dveg1 i.Dveg2 i.Dpur pur_beef pur_pork pur_chicken pur_lamb pur_others i.org imp_aw imp_organi imp_climate"
// Consequentiality perception
global conseq = "conseq_r1 conseq_r2"
// Social desirability
global desira = "i.Dsde i.Dim"
// Screening/attention
global att = "i.att"

// 29 control variables
global controls = "$dem $pol $veg $conseq $desira $att"


* Defining subsample with 5-95th percentile survey time *
sum svytime if Dglobal==1, detail
gen svytime_ok = 0
 replace svytime_ok = 1 if inrange(svytime, r(p5), r(p95))
tab svytime_ok if Dglobal==1

* Saving formatted data * 
save "PerinoSchwickert2023_data.dta", replace


* Saving formatted data with ok survey time only *
drop if svytime_ok==0
save "PerinoSchwickert2023_data_adj.dta", replace



**************************************************



*****************************************
******     Summary statistics      ******
*****************************************

* Tabulating median survey time of the sample *
sum svytime if Dglobal==1, detail 


* Checking representativeness of the sample *
preserve
keep if Dglobal==1

tempname p
postfile `p' str50 variable float pop samp p_value using PopComp, replace
	
// Adding population data
 local p_Dfemale = 0.502
 local p_Dage1 = 0.369
 local p_Dage2 = 0.394
 local p_Dage3 = 0.237
 local p_Dregion1 = 0.18
 local p_Dregion2 = 0.173
 local p_Dregion3 = 0.293
 local p_Dregion4 = 0.353
 local p_Dedu1 = 0.32
 local p_Dedu2 = 0.32
 local p_Dedu3 = 0.35
 local p_Dinc1 = 0.27
 local p_Dinc2 = 0.45
 local p_Dinc3 = 0.28
		
// Generating the table
foreach var of varlist Dfemale Dage* Dregion* Dedu* Dinc* {
// Sample means (column 1)
 sum `var'
 local samp: di %4.3f r(mean)
 
// Population means (column 2)
 local pop = `p_`var''

// t-tests (column 3)
 ttest `var' == `pop'
 local p_value: di %4.3f r(p)
		
 post `p' ("`var'") (`samp') (`pop') (`p_value')
}

postclose `p'
restore

* Generating Supplementary Table 1 *
preserve	
clear
use PopComp
export excel SupTab_1_popcomp.xls, firstrow(variables) replace
clear
erase PopComp.dta
restore



* Tabulating sample characteristics per experimental group *
preserve 
keep if Dglobal==1 

est clear
bysort block: eststo: estpost summarize $dem2, listwise
eststo Total: estpost summarize $dem2, listwise

* Generating Supplementary Table 2 *
esttab using "SupTab_2_demographics.tex", replace ///
 refcat(Dage1 "\textbf{Age groups}" Dregion1 "\textbf{Region}" ///
 Dedu1 "\textbf{Education}" Dinc1 "\textbf{Net household income}", nolabel) ///
 main(mean %15.2f) label nostar ///
 nonote nonumber nodepvar nomtitles ///
 collabels("\shortstack{Animal welfare\\Uniform Low}" "\shortstack{Animal welfare\\Uniform High}" ///
 "\shortstack{Animal welfare\\Diff Low}" "\shortstack{Animal welfare\\Diff High}" ///
 "\shortstack{Climate\\Uniform Low}" "\shortstack{Climate\\Uniform High}" ///
 "\shortstack{Climate\\Diff Low}" "\shortstack{Climate\\Diff High}" "Total") /// 
 booktabs

restore 



* Tabulating experimental group sizes *
tab block if Dglobal==1

est clear

* Generating Supplementary Table 3 *
estpost tab scheme timing if Dglobal==1
esttab using "SupTab_3_groups.tex", replace ///
 cells(b) unstack noobs nonumber collabels(none) booktabs 
 
 
 
* Tabulating meat eating behavior of the sample *
preserve 
keep if Dglobal==1

sum conhab_5 conhab_6 Dveg1 Dveg2 Dpur 

restore


**************************************************



*****************************************
******   Support for tax schemes   ******
*****************************************


****** Descriptive analysis of support rates ******


* Analyzing support rates *
tab vote proposal, column
tab vote proposal if vote!=2, column
bysort scheme: tab vote proposal if vote!=2, column


* Generating Figure 1 for support by tax level per tax scheme *
preserve
keep if vote!=2

egen ymscheme = mean(100 * vote), by(tax scheme)
egen ymall = mean(100 * vote), by(tax)
bysort tax: tab ymscheme scheme
bysort tax: tab ymall

twoway (connected ymscheme tax if scheme==1, msymbol(circle) msize(medium) mcolor(black) lwidth(medthick)  lcolor(black) lpattern(solid)) ///
 (connected ymscheme tax if scheme==2, msymbol(circle) msize(medium) mcolor(black) lwidth(medthick) lcolor(black) lpattern(dash)) ///
 (connected ymscheme tax if scheme==3, msymbol(circle) msize(medium) mcolor(gs8) lwidth(medthick) lcolor(gs8) lpattern(solid)) ///
 (connected ymscheme tax if scheme==4, msymbol(circle) msize(medium) mcolor(gs8) lwidth(medthick) lcolor(gs8) lpattern(dash)) ///
 (connected ymall tax, msymbol(circle_hollow) msize(small) mcolor(gs2) lwidth(thin) lcolor(gs4) lpattern(dot)), ///
 ytitle(Support rates (percent)) ylabel(20(10)80, noticks) xtitle(Tax levels (€/kg)) xlabel(0.19 0.39 0.58 0.78 1.17 1.56, noticks nogrid valuelabel) ///
 legend(row(3) order(1 "Animal welfare Uniform" 2 "Animal welfare Differentiated" 3 "Climate Uniform" 4 "Climate Differentiated" 5 "All tax schemes")) ///
 graphregion(fcolor(white) lcolor(white))
graph export Fig_1_supportrates.png, width(1200) replace

restore


* Analyzing abstained votes *
tab abstained proposal, column
bysort proposal: tab block abstained, chi2
bysort proposal: tab scheme abstained, chi2


* Generating Supplementary Figure 4 for abstained votes by tax level per tax scheme *
egen amscheme = mean(100 * abstained), by(tax scheme)
sort scheme tax

twoway (connected amscheme tax if scheme==1, msymbol(circle) msize(medium) mcolor(black) lwidth(medthick)  lcolor(black) lpattern(solid)) ///
 (connected amscheme tax if scheme==2, msymbol(circle) msize(medium) mcolor(black) lwidth(medthick) lcolor(black) lpattern(dash)) ///
 (connected amscheme tax if scheme==3, msymbol(circle) msize(medium) mcolor(gs8)  lwidth(medthick) lcolor(gs8) lpattern(solid)) ///
 (connected amscheme tax if scheme==4, msymbol(circle) msize(medium) mcolor(gs8)  lwidth(medthick) lcolor(gs8) lpattern(dash)), ///
 ytitle(Abstained rates (percent)) ylabel(0(2)12, noticks) xtitle(Tax levels (€/kg)) xlabel(0.19 0.39 0.58 0.78 1.17 1.56, noticks nogrid valuelabel) ///
 legend(row(4) order(1 "Animal welfare Uniform" 2 "Animal welfare Differentiated" 3 "Climate Uniform" 4 "Climate Differentiated")) ///
 graphregion(fcolor(white) lcolor(white))
graph export SupFig_4_abstentionrates.png, width(1200) replace




****** Regression analysis for support rates + salience ******

* Running linear regressions *
// Excluding abstained votes
preserve 
keep if vote!=2

est clear
eststo tonly: reg vote tax, vce(cluster id)
 estadd local control ""
 
eststo base: reg vote tax i.purpose i.type, vce(cluster id)
 estadd local control ""

eststo basec: reg vote tax i.purpose i.type $controls, vce(cluster id)
 estadd local control "X"

eststo ext: reg vote tax i.purpose i.type i.timing, vce(cluster id)
 estadd local control ""

eststo extc: reg vote tax i.purpose i.type i.timing $controls, vce(cluster id)
 estadd local control "X"

eststo extin: reg vote tax i.purpose i.type i.timing i.type#i.timing, vce(cluster id)
 estadd local control ""

eststo extinc: reg vote tax i.purpose i.type i.timing i.type#i.timing $controls, vce(cluster id)
 estadd local control "X"


* Generating Figure 2 *
coefplot (base, label(Model 1) msymbol(square) mcolor(black) ciopts(lcolor(black))) ///
 (ext, label(Model 2) msymbol(circle) mcolor(gs8) ciopts(lcolor(gs8))) ///
 (extin, label(Model 3) msymbol(diamond) mcolor(gs5) ciopts(lcolor(gs5))), drop(_cons) ///
 xline(0, lcolor(black) lpattern(dot)) xtitle("Average marginal effect on support rate") legend(row(1)) ///
 coeflabels(tax = `" "Tax levels" "(in €/kg)" "' ///
 1.purpose = `" "Climate" "(Base: Animal welfare)" "' ///
 1.type = `" "Differentiated" "(Base: Uniform)" "' ///
 1.timing = `" "High salience" "(Base: Low salience)" "' ///
 1.type#1.timing = `" "Differentiated x High salience" "(Interaction)" "') ///
 graphregion(fcolor(white) lcolor(white)) 
graph export Fig_2_regression.png, width(1200) replace


* Generating Supplementary Figure 5 *
coefplot (base, label(Model 1) msymbol(square) mcolor(black) ciopts(lcolor(black))) ///
 (basec, label(Model 1_C) msymbol(square) mfcolor(white) mlcolor(black) ciopts(lcolor(black))) ///
 (ext, label(Model 2) msymbol(circle) mcolor(gs8) ciopts(lcolor(gs8))) ///
 (extc, label(Model 2_C) msymbol(circle) mfcolor(white) mlcolor(gs8) ciopts(lcolor(gs8))) ///
 (extin, label(Model 3) msymbol(diamond) mcolor(gs5) ciopts(lcolor(gs5))) ///
 (extinc, label(Model 3_C) msymbol(diamond) mfcolor(white) mlcolor(gs5) ciopts(lcolor(gs5))), ///
 drop(_cons *.Dfemale *.ageg *.regiong *.edug *.incg hh_adults ///
 hh_kids *.Dkids *.polpos *.Dgreen *.Dveg* *.Dpur pur_* *.org imp* *_r1 conseq_r2 *.Dsde *.Dim *att) ///
 xline(0, lcolor(black) lpattern(dot)) xtitle("Average marginal effect on support rate") ///
 coeflabels(tax = `" "Tax levels" "(in €/kg)" "' ///
 1.purpose = `" "Climate" "(Base: Animal welfare)" "' ///
 1.type = `" "Differentiated" "(Base: Uniform)" "' ///
 1.timing = `" "High salience" "(Base: Low salience)" "' ///
 1.type#1.timing = `" "Differentiated x High salience" "(Interaction)" "') ///
 graphregion(fcolor(white) lcolor(white)) 
graph export SupFig_5_regression_cont.png, width(1200) replace


* Generating Supplementary Table 4 * 
esttab using "SupTab_4_regression_cont.tex", replace f b(3) se(3) ///
 mtitles("" "Model 1" "Model 1_C" "Model 2" "Model 2_C" "Model 3" "Model 3_C") ///
 coeflabel(tax "Tax levels (in €/kg)" 1.type#1.timing "Differentiated x high salience") ///
 star(* 0.10 ** 0.05 *** 0.01) label booktabs alignment(D{.}{.}{-1}) ///
 drop(*.Dfemale *.ageg *.regiong *.edug *.incg hh_adults ///
 hh_kids *.Dkids *.polpos *.Dgreen *.Dveg* *.Dpur pur_* *.org imp* *_r1 conseq_r2 *.Dsde *.Dim *att) noomitted ///
 scalars("N Observations" "N_clust Respondents" "r2 \(R^{2}\" "F F-statistic") sfmt(%9.0fc %9.0fc %9.3fc %9.3fc) nobaselevels ///
 varwidth(15) wrap
 
restore  



**************************************************



*****************************************
******      Belief treatment       ******
*****************************************



* Running generalized ordered logit regressions *
// Generalized ordered logit regression with y = own beliefs and x = tax scheme characteristics + salience * 

preserve
keep if Dglobal==1

// Overall meat consumption
eststo clear
quietly gologit2 belownall i.purpose i.type i.timing, autofit or vce(robust)
mtable, dydx(*)
eststo gologit2
forvalues o = 1 / 3 {
	margins, dydx(*) predict(outcome(`o')) post saving(f`o', replace)
	marginsplot
	eststo, title(outcome(`o'))
	estimates restore gologit2
}

combomarginsplot f1 f2 f3, title("") subtitle("Overall meat consumption") ///
 labels("Decrease" `" "Remain" "the same" "' "Increase") xtitle("") ///
 yline(0, lcolor(black) lpattern(dot)) ytitle("Average marginal effects") ylabel(-0.3(0.1)0.3, nogrid) ///
 legend(rows(3) order(4 "Climate (Base: Animal welfare)" 5 "Differentiated (Base: Uniform)" 6 "High salience (Base: Low salience)")) ///
 lplot1(msymbol(square) mcolor(black) lcolor(black)) ci1opts(lcolor(black)) ///
 lplot2(msymbol(circle) mcolor(gs8) lcolor(gs8)) ci2opts(lcolor(gs8)) ///
 lplot3(msymbol(diamond) mcolor(gs5) lcolor(gs5)) ci3opts(lcolor(gs5)) ///
 graphregion(fcolor(white) lcolor(white) margin(l+5 r+5)) name(belall, replace)
 
eststo drop gologit2


* Generating Supplementary Table 8 *
esttab using SupTab_8_ologit_ame.tex, b(3) se(3) label refcat(1.purpose "\textbf{Overall meat consumption}", nolabel) ///
 mtitles("Decrease" "Remain the same" "Increase") se star(* 0.10 ** 0.05 *** 0.01) ///
 noobs nonumbers nobaselevels title(Average Marginal Effects) booktabs f replace


// Meat consumption by subcategories
eststo clear
forvalues i = 1 / 4 {
	local lab1 = "Beef/Level 1"
    local lab2 = "Lamb/Level 2"
    local lab3 = "Pork/Level 3"
    local lab4 = "Poultry/Level 4"
	quietly gologit2 belown`i' i.purpose i.type i.timing, autofit or vce(robust)
	mtable, dydx(*)
	eststo gologit2
forvalues o = 1 / 3 {
 	margins, dydx(*) predict(outcome(`o')) post saving(f`o', replace)
	marginsplot
	eststo, title(outcome(`o'))
	estimates restore gologit2 
	}
	
combomarginsplot f1 f2 f3, title("") subtitle("`lab`i''") ///
 labels("Decrease" `" "Remain" "the same" "' "Increase") xtitle("") ///
 yline(0, lcolor(black) lpattern(dot)) ytitle("Average marginal effects") ylabel(-0.3(0.1)0.3, nogrid) ///
 legend(rows(3) order(4 "Climate (Base: Animal welfare)" 5 "Differentiated (Base: Uniform)" 6 "High salience (Base: Low salience)")) ///
 lplot1(msymbol(square) mcolor(black) lcolor(black)) ci1opts(lcolor(black)) ///
 lplot2(msymbol(circle) mcolor(gs8) lcolor(gs8)) ci2opts(lcolor(gs8)) ///
 lplot3(msymbol(diamond) mcolor(gs5) lcolor(gs5)) ci3opts(lcolor(gs5)) ///
 graphregion(fcolor(white) lcolor(white) margin(l+5 r+5)) name(bel`i', replace)
 
eststo drop gologit2

esttab using SupTab_8_ologit_ame.tex, b(3) se(3) label refcat(1.purpose "\textbf{`lab`i''}", nolabel) ///
 noobs se star(* 0.10 ** 0.05 *** 0.01) nonumbers nobaselevels nolines nomtitles booktabs f append
eststo clear
}


* Generating Figure 3 *
grc1leg2 belall bel1 bel2 bel3 bel4, hol(2) rows(3) ysize(4) xsize(3) ytol1title graphregion(fcolor(white) ilcolor(white) lcolor(white)) 
graph export Fig_3_ologit.png, width(1200) replace


* Generating Supplementary Table 9 *
eststo clear
foreach x of varlist belownall belown1 belown2 belown3 belown4 {
eststo: gologit2 `x' i.purpose i.type i.timing, autofit or vce(robust)
}

esttab using SupTab_9_ologit.tex, eform b(3) se(3) label ///
 mtitles("Overall meat consumption" "Beef/Level 1" "Lamb/Level 2" "Pork/Level 3" "Poultry/Level 4") ///
 eqlabels("\textbf{Decrease}" "\textbf{Remain the same}") ///
 se star(* 0.10 ** 0.05 *** 0.01) ///
 scalars("N Observations" "ll Log likelihood" "r2_p Pseudo \(R^{2}\)") sfmt(%9.0fc %9.2fc %9.3fc %9.3fc) ///
 nonumbers nobaselevels booktabs f replace

restore



* Running generalized ordered logit regressions for participants with uniform schemes only *
preserve
keep if Dglobal==1
keep if type==0

// Overall meat consumption 
eststo clear
quietly gologit2 belownall i.purpose i.timing, autofit or vce(robust)
mtable, dydx(*)
eststo gologit2
forvalues o = 1 / 3 {
	margins, dydx(*) predict(outcome(`o')) post saving(f`o', replace)
	marginsplot
	eststo, title(outcome(`o'))
	estimates restore gologit2
}

combomarginsplot f1 f2 f3, title("") subtitle("Overall meat consumption") ///
 labels("Decrease" `" "Remain" "the same" "' "Increase") xtitle("") ///
 yline(0, lcolor(black) lpattern(dot)) ytitle("Average marginal effects") ylabel(-0.3(0.1)0.3, nogrid) ///
 legend(rows(2) order(3 "Climate (Base: Animal welfare)" 4 "High salience (Base: Low salience)")) ///
 lplot1(msymbol(square) mcolor(black) lcolor(black)) ci1opts(lcolor(black)) ///
 lplot2(msymbol(circle) mcolor(gs8) lcolor(gs8)) ci2opts(lcolor(gs8)) ///
 graphregion(fcolor(white) lcolor(white) margin(l+5 r+5)) name(belall, replace)

eststo drop gologit2

* Generating Supplementary Table 10 *
esttab using SupTab_10_ologit_ame_uniform.tex, b(3) se(3) label refcat(1.purpose "\textbf{Overall meat consumption}", nolabel) ///
 mtitles("Decrease" "Remain the same" "Increase") noobs se star(* 0.10 ** 0.05 *** 0.01) ///
 nonumbers nobaselevels title(Average Marginal Effects) booktabs f replace


// Meat consumption by subcategories
eststo clear
forvalues i = 1 / 4 {
	local lab1 = "Beef/Level 1"
    local lab2 = "Lamb/Level 2"
    local lab3 = "Pork/Level 3"
    local lab4 = "Poultry/Level 4"
	quietly gologit2 belown`i' i.purpose i.timing, autofit or vce(robust)
	mtable, dydx(*)
	eststo gologit2
 forvalues o = 1 / 3 {
	margins, dydx(*) predict(outcome(`o')) post saving(f`o', replace)
	eststo, title(outcome(`o'))
	estimates restore gologit2
 }
 
combomarginsplot f1 f2 f3, title("") subtitle("`lab`i''") ///
 labels("Decrease" `" "Remain" "the same" "' "Increase") xtitle("") ///
 yline(0, lcolor(black) lpattern(dot)) ytitle("Average marginal effects") ylabel(-0.3(0.1)0.3, nogrid) ///
 legend(rows(2) order(3 "Climate (Base: Animal welfare)" 4 "High salience (Base: Low salience)")) ///
 lplot1(msymbol(square) mcolor(black) lcolor(black)) ci1opts(lcolor(black)) ///
 lplot2(msymbol(circle) mcolor(gs8) lcolor(gs8)) ci2opts(lcolor(gs8)) ///
 graphregion(fcolor(white) lcolor(white) margin(l+5 r+5)) name(bel`i', replace)
 
eststo drop gologit2

esttab using SupTab_10_ologit_ame_uniform.tex, b(3) se(3) label refcat(1.purpose "\textbf{`lab`i''}", nolabel) ///
 noobs se star(* 0.10 ** 0.05 *** 0.01) nonumbers nobaselevels nolines nomtitles booktabs f append
eststo clear
}


* Generating Extended Data Figure 1 *
grc1leg2 belall bel1 bel2 bel3 bel4, hol(2) rows(3) ysize(4) xsize(3) ytol1title graphregion(fcolor(white) ilcolor(white) lcolor(white)) 
graph export ExtFig_S1_ologit_ame_uniform.png, width(1200) replace


* Generating Supplementary Table 11 *
eststo clear
foreach x of varlist belownall belown1 belown2 belown3 belown4 {
eststo: gologit2 `x' i.purpose i.timing, autofit or vce(robust)
}

esttab using SupTab_11_ologit_uniform.tex, eform label b(3) se(3) ///
 mtitles("Overall meat consumption" "Beef/Level 1" "Lamb/Level 2" "Pork/Level 3" "Poultry/Level 4") ///
 eqlabels("\textbf{Decrease}" "\textbf{Remain the same}") ///
 se star(* 0.10 ** 0.05 *** 0.01) ///
 scalars("N Observations" "ll Log likelihood" "r2_p Pseudo \(R^{2}\)") sfmt(%9.0fc %9.2fc %9.3fc %9.3fc) ///
 nonumbers nobaselevels booktabs f replace

restore

erase "f1.dta"
erase "f2.dta"
erase "f3.dta"



**************************************************



*****************************************
******     Comment analysis        ******
*****************************************

* Checking distribution of coded remarks *
label var remark_cc "Coded comments"
 label define remark_cc 1 "pro differentiated" 2 "against differentiated"
 label values remark_cc remark_cc

tab remark_cc scheme if Dglobal==1 



**************************************************



*****************************************
******     Robustness checks       ******
*****************************************

* Running linear regression with tax levels as categorical variables * 
preserve 
keep if vote!=2

est clear
eststo tonly: reg vote i.tax_c, vce(cluster id)
 estadd local control ""
 
eststo base: reg vote i.tax_c i.purpose i.type, vce(cluster id)
 estadd local control ""

eststo basec: reg vote i.tax_c i.purpose i.type $controls, vce(cluster id)
 estadd local control "X"
 
eststo ext: reg vote i.tax_c i.purpose i.type i.timing, vce(cluster id)
 estadd local control ""

eststo extc: reg vote i.tax_c i.purpose i.type i.timing $controls, vce(cluster id)
 estadd local control "X"

eststo extin: reg vote i.tax_c i.purpose i.type i.timing i.type#i.timing, vce(cluster id)
 estadd local control ""

eststo extinc: reg vote i.tax_c i.purpose i.type i.timing i.type#i.timing $controls, vce(cluster id)
 estadd local control "X"


* Generating Supplementary Figure 6 *
coefplot (base, label(Model 1) msymbol(square) mcolor(black) ciopts(lcolor(black))) ///
 (basec, label(Model 1_C) msymbol(square) mfcolor(white) mlcolor(black) ciopts(lcolor(black))) ///
 (ext, label(Model 2) msymbol(circle) mcolor(gs8) ciopts(lcolor(gs8))) ///
 (extc, label(Model 2_C) msymbol(circle) mfcolor(white) mlcolor(gs8) ciopts(lcolor(gs8))) ///
 (extin, label(Model 3) msymbol(diamond) mcolor(gs5) ciopts(lcolor(gs5))) ///
 (extinc, label(Model 3_C) msymbol(diamond) mfcolor(white) mlcolor(gs5) ciopts(lcolor(gs5))), ///
 drop(_cons *.Dfemale *.ageg *.regiong *.edug *.incg hh_adults ///
 hh_kids *.Dkids *.polpos *.Dgreen *.Dveg* *.Dpur pur_* *.org imp* *_r1 conseq_r2 *.Dsde *.Dim *att) ///
 xline(0, lcolor(black) lpattern(dot)) xtitle("Average marginal effect on support rate") xlabel(-0.4(0.1)0.1) ///
 coeflabels(1.purpose = `" "Climate" "(Base: Animal welfare)" "' ///
 1.type = `" "Differentiated" "(Base: Uniform)" "' ///
 1.timing = `" "High salience" "(Base: Low salience)" "' ///
 1.type#1.timing = `" "Differentiated x High salience" "(Interaction)" "') ///
 headings(2.tax_c = "{bf:Tax levels as binary variables}") ///
 graphregion(fcolor(white) lcolor(white))
graph export SupFig_6_regression_cat.png, width(1200) replace


* Generating Supplementary Table 5 * 
esttab using "SupTab_5_regression_cat.tex", replace f b(3) se(3) ///
 mtitles("" "Model 1" "Model 1_C" "Model 2" "Model 2_C" "Model 3" "Model 3_C") ///
 coeflabel(tax "Tax levels (in €/kg)"  1.type#1.timing "Differentiated x high salience") ///
 star(* 0.10 ** 0.05 *** 0.01) label booktabs alignment(D{.}{.}{-1}) ///
 drop(*.Dfemale *.ageg *.regiong *.edug *.incg hh_adults ///
 hh_kids *.Dkids *.polpos *.Dgreen *.Dveg* *.Dpur pur_* *.org imp* *_r1 conseq_r2 *.Dsde *.Dim *att) noomitted ///
 scalars("N Observations" "N_clust Respondents" "r2 \(R^{2}\" "F F-statistic") sfmt(%9.0fc %9.0fc %9.3fc %9.3fc) nobaselevels 
 
restore



* Running logistic regressions *
// Excl. abstained votes
preserve
keep if vote!=2

est clear

eststo baseOR: logit vote tax i.purpose i.type, or vce(cluster id)
 eststo base: margins, dydx(*) post
 estadd local control ""

eststo basecOR: logit vote tax i.purpose i.type $controls, or vce(cluster id)
 eststo basec: margins, dydx(tax purpose type) post
 estadd local control "X"

eststo extOR: logit vote tax i.purpose i.type i.timing, or vce(cluster id)
 eststo ext: margins, dydx(*) post
 estadd local control ""

eststo extcOR: logit vote tax i.purpose i.type i.timing $controls, or vce(cluster id)
 eststo extc: margins, dydx(tax purpose type timing) post
 estadd local control "X"
  
eststo extinOR: logit vote tax i.purpose i.type i.timing i.type#i.timing, or vce(cluster id)
 margins timing, dydx(type) 
 eststo extin: margins, dydx(*) post
 estadd local control ""

eststo extincOR: logit vote tax i.purpose i.type i.timing i.type#i.timing $controls, or vce(cluster id)
 margins timing, dydx(type)
 eststo extinc: margins, dydx(tax purpose timing) post
 estadd local control "X"
 
 
* Generating Supplementary Table 6 for logit regression - average marginal effects * 
esttab base basec ext extc extinc extinc using "SupTab_6_logit.tex", replace f b(3) se(3) ///
 mtitles("Model 1" "Model 1_C" "Model 2" "Model 2_C" "Model 3" "Model 3_C") ///
 coeflabel(tax "Tax levels (in €/kg)"  1.type#1.timing "Differentiated x high salience") ///
 star(* 0.10 ** 0.05 *** 0.01) label booktabs alignment(D{.}{.}{-1}) noomitted nobaselevels noobs
 
* Generating Supplementary Table 6 for logit regression - odds ratios * 
esttab baseOR basecOR extOR extcOR extinOR extincOR using "SupTab_6_logit.tex", append f eform b(3) se(3) ///
 drop(_cons *.Dfemale *.ageg *.regiong *.edug *.incg hh_adults ///
 hh_kids *.Dkids *.polpos *.Dgreen *.Dveg* *.Dpur pur_* *.org imp* *_r1 conseq_r2 *.Dsde *.Dim *att) ///
 coeflabel(tax "Tax levels (in €/kg)"  1.type#1.timing "Differentiated x high salience") ///
 star(* 0.10 ** 0.05 *** 0.01) label booktabs alignment(D{.}{.}{-1}) noomitted nomtitles ///
 scalars("N Observations" "N_clust Respondents" "r2_p Pseudo \(R^{2}\)" "ll Log pseudolikelihood") sfmt(%9.0fc %9.0fc %9.3fc %9.3fc) nobaselevels

restore

// Average marginal effects for differentiated tax by salience were manually added to SupTab_6_logit.tex. 



* Running linear regressions with restricted and unrestricted sample *
// Excluding abstained votes
est clear

eststo extin: reg vote tax i.purpose i.type i.timing i.type#i.timing if vote!=2, vce(cluster id)
 estadd local control ""

eststo extinc: reg vote tax i.purpose i.type i.timing i.type#i.timing $controls if vote!=2, vce(cluster id)
 estadd local control "X"
 
save "PerinoSchwickert2023_data_adj.dta", replace

use "PerinoSchwickert2023_data.dta"

eststo extin_f: reg vote tax i.purpose i.type i.timing i.type#i.timing if vote!=2, vce(cluster id)
 estadd local control ""

eststo extinc_f: reg vote tax i.purpose i.type i.timing i.type#i.timing $controls if vote!=2, vce(cluster id)
 estadd local control "X"


* Generating Supplementary Table 7 * 
esttab using "SupTab_7_regression_robust.tex", replace f b(3) se(3) ///
 mgroups("Restricted sample" "Unrestricted sample", pattern(1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
 coeflabel(tax "Tax levels (in €/kg)" 1.type#1.timing "Differentiated x high salience") nomtitles ///
 star(* 0.10 ** 0.05 *** 0.01) label booktabs alignment(D{.}{.}{-1}) ///
 drop(*.Dfemale *.ageg *.regiong *.edug *.incg hh_adults ///
 hh_kids *.Dkids *.polpos *.Dgreen *.Dveg* *.Dpur pur_* *.org imp* *_r1 conseq_r2 *.Dsde *.Dim *att) noomitted ///
 scalars("N Observations" "N_clust Respondents" "r2 R-squared" "F F-statistic") sfmt(%9.0fc %9.0fc %9.3fc %9.3fc) nobaselevels ///
 varwidth(15) wrap

 
* Tabulating extra payments for correct belief estimation for unrestricted sample *
tab tobepaid if Dglobal==1, missing
sum tobepaid if Dglobal==1
 
 
 
log close
